package sm.routine.workload;

import java.util.HashMap;
import java.util.Map;

public class WorkLoad {

	private Map<String,Integer> _workload;
	
	public WorkLoad(){
		this._workload = new HashMap<String,Integer>();
	}
	public void reset(String name){
		this._workload.put(name, 0);
	}
	public void newMember(String name){
		this._workload.put(name, 0);
	}
	public void addLoad(String name){
		int curl = this._workload.get(name);
		int inl = curl+1;
		this._workload.put(name, inl);
	}
	public void deLoad(String name){
		int curl = this._workload.get(name);
		int inl = curl-1;
		this._workload.put(name, inl);
	}
	public int getLoad(String name){
		return this._workload.get(name);
	}
}
